package com.myblog.myblog.dao;

import com.myblog.myblog.poge.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


import java.util.List;

public interface TagRepository extends JpaRepository<Tag,Long> {
    Tag findByName(String name);

    @Query("select g from Tag g")
    List<Tag> findTop(Pageable pageable);
}
